#ifndef __BSP_H
#define __BSP_H

#include "um.h"
//APB1  36mhz  APB2 72mhz  AHB  HCLK  144mhz
//-----------------------------
// RS485  battery  USART1
// USmart TTL   USART2
// TCP_TTL    USART3
// RS232_FOCS  UART4  ZoomMotor
// RS232 Laser UART5

// ADC1  PC0   NTC
// ADC2  PC1   NTC
// ADC3  PC2   NTC
// ADC4  PC3   NTC
// ADC5  PA0   NTC
// ADC7  PA5   NTC      // on board  R47  NCP18XH103F03RB   10k

//ADC6  PA1   PD

// PA4 PWM DAC  um_PWM


// beng    pump1
//ADC8    PA6      I1
//ADC9    PA7       V1
//pump2
//ADC10   PC4      I2
//ADC11   PC5      V2

extern u8 pad_laser_enable;


extern u8  bsp_address;

extern u8  bsp_laser_status;

extern u16 bsp_half_sec_cnt;

extern void BSP_Init(void);

//extern void BSP_Out( u8 n,BitAction bit_status);

extern void BSP_Beep(u8 on_status);

extern void BSP_GreenLED(u8 on_status);

extern void BSP_Laser(u8 on_status);

extern void BSP_LaserEnable(u8 on_status);

extern void BSP_LaserAlarm(u8 on_status);

extern void BSP_WorkLed(u8 on_status);


extern void BSP_Exec();

extern void BSP_LaserDAC(uint16_t volt);

extern void BSP_SetLaserPower(u8 power);

extern u8 BSP_IsProtected();

#endif
